#ifndef UDPTEST_H
#define UDPTEST_H

#include <QObject>
#include <QUdpSocket>
#include <QTimer>

class UdpTest : public QObject
{
    Q_OBJECT

public:
    explicit UdpTest(QObject *parent = nullptr);
    UdpTest(QString IPAddress, QObject *parent = nullptr);

private slots:
    void receiveData();
    void sendData();

private:
    bool checkData(const QByteArray datas);

private:
    QUdpSocket* p_soc;
    bool m_sending;
    QByteArray m_testData;
    int m_sendSpeed;
    QHostAddress m_clientIP;
    quint16 m_clientPort;
    int m_count;
};

#endif // UDPTEST_H
